package com.lanchetech.dao;
import java.math.BigDecimal;
import java.util.Collection;

import com.lanchetech.bean.request.GroupsPerformancePageReq;
import com.lanchetech.bean.vo.GroupsPerformanceVO;
import com.lanchetech.entity.GroupsPerformance;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface GroupsPerformanceMapper {
    int deleteByPrimaryKey(Long id);

    int insert(GroupsPerformance record);

    int insertSelective(GroupsPerformance record);

    GroupsPerformance selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(GroupsPerformance record);

    int updateByPrimaryKey(GroupsPerformance record);

    int updateBatch(List<GroupsPerformance> list);

    int updateBatchSelective(List<GroupsPerformance> list);

    int batchInsert(@Param("list") List<GroupsPerformance> list);

    List<GroupsPerformanceVO> findAllPage(GroupsPerformancePageReq req);

    GroupsPerformance findOneByStatusAndOrderSkuId(@Param("status")Byte status,@Param("orderSkuId")Long orderSkuId);

    List<GroupsPerformance> findAllByStatusAndOrderSkuIdIn(@Param("status")Byte status,@Param("orderSkuIdCollection")Collection<Long> orderSkuIdCollection);


    BigDecimal sumGroupPerformance(GroupsPerformancePageReq req);

    BigDecimal sumByUserId(@Param("userId")Long userId);


}